#include "common.h"

int main(){
    // Test

    char str[6];
    int num = 12345;

    my_itoa(str, num, 10);
    printf("my_itoa: %d --> %s \n", num, str);
    
    printf("my_atoi: %s --> %d \n\n", str, my_atoi(str));

    char const *src = "abcde";
    char dest[10];

    printf("my_strlen: len of [%s] = %d \n\n", src, my_strlen(src));

    my_strcpy(dest, src);
    printf("my_strcpy: from [%s] to [%s] \n\n", src, dest);
    
    my_strcat(dest, "fghi");
    printf("my_strcat: add [%s] to [%s] is [%s] \n\n", "fghi", src, dest);
    // printf("my_strcat: add [%s] to [%s] is [%s] \n\n", "fghi", src, my_strcat(dest, "fghi"));

    printf("my_strcmp: [%s] VS [%s] = %d \n\n", src, dest, my_strcmp(src, dest));
    printf("my_strcmp: [%s] VS [%s] = %d \n\n", dest, src, my_strcmp(dest, src));
    printf("my_strcmp: [%s] VS [%s] = %d \n\n", src, "dest", my_strcmp(src, "dest"));
    printf("my_strcmp: [%s] VS [%s] = %d \n\n", "dest", "dest", my_strcmp("dest", "dest"));
    printf("my_strcmp: [%s] VS [%s] = %d \n\n", dest, dest, my_strcmp(dest, dest));

    return 0;
}